<script setup>
import { ref, onMounted } from 'vue';
import { useRoute } from 'vue-router';

// 获取当前路由对象
const route = useRoute();

// 定义响应式变量
const projectCode = ref('');
const projectName = ref(''); // 如果你需要显示项目名称而不是 ID

// 在组件挂载时获取项目 ID 并加载数据
onMounted(() => {
  projectCode.value = route.params.projectCode;
  
});

</script>

<template>
<van-grid :column-num="3">
  <van-grid-item icon="photo-o" text="工作流定义" 
  :to="{
          name: 'opsProcessDefine',
          params: { projectCode: projectCode }
        }"/>
  <van-grid-item icon="photo-o" text="工作流实例" 
  :to="{
          name: 'opsProcessInstance',
          params: { projectCode: projectCode }
        }"/>
  <van-grid-item icon="photo-o" text="任务实例" 
  :to="{
          name: 'opsTaskInstance',
          params: { projectCode: projectCode }
        }"/>
</van-grid>
</template>

<style scoped>
</style>
